﻿<navigation:Page x:Class="RM.WebClient.AddEditQuestion" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           xmlns:datagrid="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" 
           d:DesignWidth="640" d:DesignHeight="480"
           Title="AddEditQuestion Page">
    <Grid x:Name="LayoutRoot" HorizontalAlignment="Stretch" ShowGridLines="False">
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
            <Grid.RowDefinitions>
                <RowDefinition Height="50"/>
                <RowDefinition  Height="50"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="Name" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center"></TextBlock>
            <TextBox Name="txtName" Grid.Row="0" Width="125" Height="25" VerticalAlignment="Center" Text="{Binding Name, Mode=TwoWay}" Grid.Column="1"></TextBox>
            <TextBlock Text="Experience" Grid.Row="0" Grid.Column="2" VerticalAlignment="Center"></TextBlock>
            <TextBox Name="txtExperience" Grid.Row="0" Width="125" Height="25" VerticalAlignment="Center" Text="{Binding Experience, Mode=TwoWay}" Grid.Column="3"></TextBox>
            <TextBlock Text="Language" Grid.Row="1" Grid.Column="0"></TextBlock>
            <TextBox Name="txtLanguage" Width="125" Height="25"  VerticalAlignment="Center" Grid.Row="1" Grid.Column="1" Text="{Binding Language, Mode=TwoWay}"></TextBox>
            <TextBlock Text="Technology" Grid.Row="1" Grid.Column="2"></TextBlock>
            <TextBox Name="txtTechnology" Width="125" Height="25"  VerticalAlignment="Center" Grid.Row="1" Grid.Column="3" Text="{Binding Technology, Mode=TwoWay}"></TextBox>
        </Grid>
        <Grid Grid.Row="1" HorizontalAlignment="Stretch">
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <Button Content="Add"  Width="100" Height="25" Grid.Row="0" Name="btnAddQues" Click="btnAddQues_Click"></Button>
            <datagrid:DataGrid x:Name="dataGrid" AutoGenerateColumns="False"  VerticalAlignment="Top" Height="487" 
                           MinColumnWidth="10" Grid.Row="1" 
                           ScrollViewer.HorizontalScrollBarVisibility="Auto" 
                           ScrollViewer.VerticalScrollBarVisibility="Auto" IsReadOnly="True">
                <datagrid:DataGrid.Columns>
                    <datagrid:DataGridTextColumn Binding="{Binding Content}" Header="Question"></datagrid:DataGridTextColumn>
                    <datagrid:DataGridTextColumn Binding="{Binding CreatedDate}" Header="CreatedDate"></datagrid:DataGridTextColumn>
                    <datagrid:DataGridTextColumn Binding="{Binding ModifiedDate}" Header="ModifiedDate"></datagrid:DataGridTextColumn>
                    <datagrid:DataGridTemplateColumn Header="Edit">
                        <datagrid:DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <Image Source="RMS_Images/Edit.png" Cursor="Hand" Width="20" Height="20" MouseLeftButtonUp="Edit_MouseUp"></Image>
                            </DataTemplate>
                        </datagrid:DataGridTemplateColumn.CellTemplate>
                    </datagrid:DataGridTemplateColumn>
                </datagrid:DataGrid.Columns>
                <!--<datagrid:DataGrid.RowDetailsTemplate>
                    <DataTemplate>
                        <StackPanel Background="LightBlue">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="This item has details." />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{Binding FirstName}" />
                                <TextBlock Text=" " />
                                <TextBlock Text="{Binding LastName}" />
                            </StackPanel>
                        </StackPanel>
                    </DataTemplate>
                </datagrid:DataGrid.RowDetailsTemplate>-->
            </datagrid:DataGrid>
        </Grid>
        <Grid Grid.Row="2">
            <Button Content="Save"  Width="100" Height="25" Name="btnSave" Click="Save_Click"></Button>
        </Grid>
    </Grid>
    
</navigation:Page>
